package example;
import facecat.topin.core.*;
import facecat.topin.xml.*;
import facecat.topin.tab.*;
import facecat.topin.input.*;
import facecat.topin.div.*;
import facecat.topin.swing.*;

/*
 * 下拉列表示例
 */
public class ComboBoxExample extends FCUIXml
{
    /*
     * 加载Xml
     * @param fileName 文件名
     * @param view 视图名称
     */
   public void loadXml(String fileName, FCView view)
   {
       setScript(new FaceCatScript(this));
       super.loadXml(fileName, view);
       //获取第二页
       FCTabPage tabPage = getTabPage("TabPage2");
       FCComboBox comboBox = new FCComboBox();
       comboBox.setLocation(new FCPoint(100, 100));
       comboBox.setSize(new FCSize(100, 20));
       tabPage.addView(comboBox);
       comboBox.addItem(new FCMenuItem("选项4"));
       comboBox.addItem(new FCMenuItem("选项5"));
       comboBox.addItem(new FCMenuItem("选项6"));
       comboBox.setSelectedIndex(0);
   }
}